/*
 * Author Niharika Soni
 */
package com.NewsFeedClasses;
// NewsFeed Class to represent facebook News feed posts from user home page

public class NewsFeed {
	private String m_NewsFeedID;
	private String m_NewsFeedType;
	private Long m_NewsFeedLikeCount;
	private String m_NewsFeedName;
	private String m_NewsFeedMessage;
	private String m_NewsFeedLink;
	
	public NewsFeed()
	{
		m_NewsFeedID = "";
		m_NewsFeedType = "";
		m_NewsFeedLikeCount = (long) 0;
		m_NewsFeedName = "";
		m_NewsFeedMessage = "";
		m_NewsFeedLink = "";
		
	}
	protected void setNewsFeedID(String newsFeedID) {
		if(newsFeedID == null)
			m_NewsFeedID = "1#1";
		else
			m_NewsFeedID = newsFeedID;
	}
	public String getNewsFeedID() {
		return m_NewsFeedID;
	}
	protected void setNewsFeedType(String newsFeedType) {
		if(newsFeedType == null)
			m_NewsFeedType = "NO TYPE";
		else
			m_NewsFeedType = newsFeedType;
	}
	public String getNewsFeedType() {
		return m_NewsFeedType;
	}
	protected void setNewFeedLikeCount(Long newsFeedLikeCount) {
		if(newsFeedLikeCount == null)
				m_NewsFeedLikeCount = (long)0;
		else
			m_NewsFeedLikeCount = newsFeedLikeCount;
	}
	public long getNewFeedLikeCount() {
		return m_NewsFeedLikeCount;
	}
	protected void setNewsFeedName(String newsFeedName) {
		if(newsFeedName == null)
			m_NewsFeedName = "NO NAME";
		else
			m_NewsFeedName = newsFeedName;
	}
	private String getNewsFeedName() {
		return m_NewsFeedName;
	}
	protected void setNewsFeedMessage(String newsFeedMessage) {
		if(newsFeedMessage == null)
			m_NewsFeedMessage = "NO MESSAGE";
		else
			m_NewsFeedMessage = newsFeedMessage;
	}
	public String getNewsFeedMessage() {
		if(getNewsFeedType().equalsIgnoreCase("status"))
			return m_NewsFeedMessage;
		else 
				if(getNewsFeedType().equalsIgnoreCase("link"))
				{
					if(getNewsFeedName().toString().equals("NO NAME"))
						return "Go To Link <!-- "+getNewsFeedLink()+ " -->";
					else
						return getNewsFeedName()+" Go To Link <!-- "+getNewsFeedLink()+" -->";
				}
				else
				if(getNewsFeedType().equalsIgnoreCase("photo"))
				{
					if(getNewsFeedName().toString().equals("NO NAME"))
						return "Go To Link <!-- "+getNewsFeedLink()+ " -->";
					else
						return getNewsFeedName()+" Go To Link <!-- "+getNewsFeedLink()+" -->";
				}
				else
				if(getNewsFeedType().equalsIgnoreCase("video"))
				{
					if(getNewsFeedName().toString().equals("NO NAME"))
						return "Go To Link <!-- "+getNewsFeedLink()+ " -->";
					else
						return getNewsFeedName()+" Go To Link <!-- "+getNewsFeedLink()+" -->";
				}
				else
					return "NO MESSAGE";
		}		
	protected void setNewsFeedLink(String newsFeedLink) {
		if(newsFeedLink == null)
			m_NewsFeedLink = "NO LINK";
		else
			m_NewsFeedLink = newsFeedLink;
	}
	private String getNewsFeedLink() {
		return m_NewsFeedLink;
	}
	

}
